<?php
$this->breadcrumbs=array(
	$model->title,
);
$this->pageTitle=$model->title;
?>

<?php $this->renderPartial('_view2', array(
	'data'=>$model,
)); ?>

<div id="comments" class="post_comment">
<!-- 评论列表 -->
	<?php if($model->commentCount>=1): ?>
		<h3><?php echo $model->commentCount>1 ? $model->commentCount . ' 个评论' : '1个评论'; ?></h3>
		<ol class="commentlist">
		<?php $this->renderPartial('_comments',array(
			'post'=>$model,
			'comments'=>$model->comments,
		)); ?>
		</ol>
	<?php else:?>
		<h3>0个评论</h3>
		<div class="list-view" id="content_comment">
			<ol class="commentlist"><span class="empty">莫非?这就是传说中的沙发...有木有!</span></ol>
		</div>
	<?php endif; ?>
<!-- 评论列表 -->
<!-- 我要评论 -->
	<?php if(Yii::app()->user->hasFlash('commentSubmitted')): ?>
		<div class="flash-success">
			<?php echo Yii::app()->user->getFlash('commentSubmitted'); ?>
		</div>
	<?php else: ?>
		<?php $this->renderPartial('/comment/_form',array(
			'model'=>$comment,
		)); ?>
	<?php endif; ?>
<!-- 我要评论 -->


</div><!-- comments -->



</div><!--post-->


<script type="text/javascript" src="/js/xheditor-1.1.14/xheditor-1.1.14-zh-cn.min.js"></script>
